package com.yyl.main

import org.junit.Test

import org.junit.Assert.*

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
class ExampleUnitTest {

    @Test
    fun addition_isCorrect() {
        assertEquals(4, 2 + 2)
    }

    @Test
    fun test223(){
        val list= doubleArrayOf(0.81,0.69,0.9,1.0)
        list.forEach {
            println("$it = ${test2(it)}")
        }

    }

    fun test2(value:Double):Int{
       return when (value) {
            in 0.50..0.699 -> 1
            in 0.70..0.799 -> 2
            in 0.80..0.899 -> 3
            in 0.90..1.0 -> 4
            in 1.0..1.2 -> 5
            else -> 1
        }
    }

}